package cetc54.zhtx.config;

import cetc54.zhtx.entity.HeartBeat;
import cetc54.zhtx.start.HotStandbyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 双机热备自动配置类
 * @author lipeng
 */
@Configuration
@EnableConfigurationProperties(HeartBeat.class)
public class HeartBeatConfiguration {
    @Bean
    public HotStandbyService getBean(HeartBeat heartBeat){
        return new HotStandbyService(heartBeat);
    }


}
